package persistencia;

import java.sql.Connection;
import java.sql.DriverManager;
	
public class Conexion {


	  public static Connection conectar(String database) throws Exception {
			    String driverName = "org.gjt.mm.mysql.Driver";
			    Class.forName(driverName);

			    String serverName = "192.168.0.113";
			    String mydatabase = database;
			    String url = "jdbc:mysql://" + serverName + "/" + mydatabase; 
			                                                                    
			    String username = "bajon";
			    String password = "bajon";
			    Connection con = DriverManager.getConnection(url, username, password);
			    
			    return con;

			  }

}
